Auto merge of #1345 - badboy:pass-cargo-name, r=alexcrichton
authorbors <bors@rust-lang.org>
Tue, 24 Feb 2015 20:14:59 +0000 (20:14 +0000)
committerbors <bors@rust-lang.org>
Tue, 24 Feb 2015 20:14:59 +0000 (20:14 +0000)
commit844a06085f42bd7aee34b4bffc25910dab30d620
tree3557dbd695eda46cbc405f3d5c19f57ab0890aff
parent26b42793eaddb63f2889e191a31365e02935e02f
parent8232c9b401ecded5b5cf4b5af8cbd5c61d7e4e66
Auto merge of #1345 - badboy:pass-cargo-name, r=alexcrichton

This reverts a change from ee5e24ff8b5.

Before it passed "foo" as `argv[0]`, which does not help much (consider the case there is one script symlinked to different names to handle different things).

This patch changes that to `cargo-{command}`.

It also reverts the passing of "foo" on the help command. Before it used `os::arg`, a different (and ugly) solution would be:

    let args = &[env::args().next().unwrap().clone(), "-h".to_string()];
src/bin/cargo.rs